<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
	request.setAttribute("basePath", basePath);
%>
<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
		<title>新增留言</title>
		<base href="${basePath}/static/admin/">
		<link rel="icon" href="favicon.ico" type="image/ico">
		<meta name="keywords" content="后台模板,后台管理系统,HTML模板">
		<meta name="description" content="基于Bootstrap的后台管理系统模板">
		<meta name="author" content="www.bootstrapmb.com">
		<link href="css/bootstrap.min.css" rel="stylesheet">
		<link href="css/fonts.css" rel="stylesheet">
		<!--标签插件-->
		<link rel="stylesheet" href="js/jquery-tags-input/jquery.tagsinput.min.css">
		<link href="css/style.css" rel="stylesheet">
		<!--找到对应的路径，找到我们的插件位置-->
		<link rel="stylesheet" href="kindeditor/themes/default/default.css" />
		<script charset="utf-8" src="kindeditor/kindeditor-min.js"></script>
		<script charset="utf-8" src="kindeditor/lang/zh_CN.js"></script>
		<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="content"]', {
					allowFileManager : true
				});
				K('input[name=getHtml]').click(function(e) {
					alert(editor.html());
				});
				K('input[name=isEmpty]').click(function(e) {
					alert(editor.isEmpty());
				});
				K('input[name=getText]').click(function(e) {
					alert(editor.text());
				});
				K('input[name=selectedHtml]').click(function(e) {
					alert(editor.selectedHtml());
				});
				K('input[name=setHtml]').click(function(e) {
					editor.html('<h3>Hello KindEditor</h3>');
				});
				K('input[name=setText]').click(function(e) {
					editor.text('<h3>Hello KindEditor</h3>');
				});
				K('input[name=insertHtml]').click(function(e) {
					editor.insertHtml('<strong>插入HTML</strong>');
				});
				K('input[name=appendHtml]').click(function(e) {
					editor.appendHtml('<strong>添加HTML</strong>');
				});
				K('input[name=clear]').click(function(e) {
					editor.html('');
				});
			});
		</script>
	</head>

	<body>
		<!--页面主要内容-->
		<main class="ftdms-layout-content">

			<div class="container-fluid" style="height: 1200px;">

				<div class="row" style="margin-top:15px;">
					<div class="col-lg-12">
						<div class="card">
							<div class="card-body">
								<!--帖子发表的表单信息-->
								<form action="../../addmessage.action" method="post" class="row">
									<input type="hidden" name="uId" value="${createUser.uId}" >

									<div class="form-group col-md-12">
										<label >留言内容</label>
										<input type="text" class="form-control" id="messageContent" name="messageContent" value="" placeholder="请输入留言内容" />
									</div>

									<div class="form-group col-md-12">
										<label>闲置标题</label>
										<select class="form-control" name="usedId">
											<c:forEach var="used" items="${list}">
												<option value="${used.usedId}">${used.usedTitle}</option>
											</c:forEach>
										</select>
									</div>
<%--									<div class="form-group col-md-12">--%>
<%--										<label for="seo_description">闲置编号</label>--%>
<%--										<input type="text" class="form-control" id="usedId" name="usedId" value="${used.usedId}" />--%>
<%--									</div>--%>
									<div class="form-group col-md-12">
										<label for="seo_keywords">用户名称</label>
										<input type="text" class="form-control" id="seo_keywords" name="当前登录的人"  value="${createUser.uName}" />
									</div>
									<div class="form-group col-md-12">
										<button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
										<button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
									</div>
								</form>

							</div>
						</div>
					</div>
				</div>
			</div>
		</main>
		<!--End 页面主要内容-->
		</div>
		</div>

		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/bootstrap.js"></script>
		<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
		<!--标签插件-->
		<script src="js/jquery-tags-input/jquery.tagsinput.min.js"></script>
		<script type="text/javascript" src="js/main.min.js"></script>
	</body>

</html>